Skip to content

feat: dependabot workflow#2

Open
justanothersynth wants to merge 6 commits intomainfrom
feat-dependabot-workflow
Open

feat: dependabot workflow#2
justanothersynth wants to merge 6 commits intomainfrom
feat-dependabot-workflow

Conversation

@justanothersynth
Copy link
Copy Markdown
Member

@justanothersynth justanothersynth commented Mar 30, 2026

Description

Add org-wide Dependabot infrastructure: GitHub Actions workflows for automated vulnerability lifecycle management and private CodeArtifact package support, plus comprehensive documentation.

The webhook handler that drives real-time alert/PR triage is deployed as an AWS Lambda in the infra repo — this PR adds the supporting workflows and org-level configuration it depends on.

Overview

graph TD
    subgraph webhook ["Org Webhook → AWS Lambda"]
        GH["GitHub Events"] --> Lambda["dependabot-webhook\n(AWS Lambda)"]
        Lambda -->|"dependabot_alert.created"| AlertHandler[Alert Handler]
        Lambda -->|"pull_request.opened"| PRHandler[PR Handler]
        Lambda -->|"pull_request.closed+merged"| MergeHandler[Merge Handler]
    end

    subgraph actions ["Slack + Linear + GitHub API"]
        AlertHandler -->|"post"| Slack["Slack\n(GHSA-keyed thread)"]
        AlertHandler -->|"create ticket"| Linear["Linear\n(GHSA in title)"]
        PRHandler -->|"reply in thread"| Slack
        PRHandler -->|"comment on ticket"| Linear
        PRHandler -->|"auto-merge / label"| GitHubAPI[GitHub API]
        MergeHandler -->|"reply: resolved"| Slack
    end

    subgraph infra [Infrastructure Workflows]
        Refresh["refresh_codeartifact_token\n(every 10h)"] -->|"rotates"| CASecret["Org Dependabot secret:\nCA_TOKEN"]
        Sync["sync_dependabot_config\n(daily)"] -->|"opens PRs"| DYml["dependabot.yml\n(per repo)"]
    end
Loading
  • refresh_codeartifact_token.yml — Rotates the CodeArtifact auth token every 10 hours and stores it as an org-level Dependabot secret (CA_TOKEN), keeping Dependabot able to resolve private packages like amera-core and amera-workflow
  • sync_dependabot_config.yml — Syncs a canonical dependabot.yml template to every repo with a CodeArtifact-backed pyproject.toml, opening PRs (not direct pushes) for SOC2 compliance, with Slack + Linear notifications
  • dependabot-template.yml — Single source of truth for Dependabot config across Python repos (CodeArtifact registry, pip/docker/github-actions ecosystems)
  • Updated README with architecture diagrams, org webhook setup, prerequisites, and documentation for the skip list and template update workflow

Contributes to AMR-1652

Risk Level

  • Low — minor change, no impact on production data or security

Rollback Plan

Revert this PR and remove the org webhook. The Lambda (deployed separately in the infra repo) is stateless — removing it simply stops Dependabot notifications and auto-merge. The refresh and sync workflows are new scheduled jobs — removing them stops token rotation and config syncing. No impact on application behavior.

PHI Impact

  • This change affects systems that create, receive, maintain, or transmit PHI — HIPAA impact reviewed

Testing

  • Tested in non-production environment

@justanothersynth justanothersynth self-assigned this Mar 30, 2026
@justanothersynth justanothersynth requested a review from jcace March 30, 2026 14:04
Copy link
Copy Markdown

@Katyaraa1 Katyaraa1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably rewrite this to a lambda

@justanothersynth justanothersynth requested review from Katyaraa1 and removed request for jcace March 31, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants